<?php

/**
 * UnauthorizedException
 *
 * @author vbolshov
 */

namespace km\exception;

use \Exception;

class UnauthorizedException extends HttpErrorException {
	function __construct($message = null, $code = 401)
	{
		$message = $message ?: '401 Unauthorized';
		parent::__construct($message, $code);
		$this->header('Status: 401 Unauthorized', 401);
	}
}